3.1.18 \(\int \frac {(a+b \tanh ^{-1}(c+d x))^2}{c e+d e x} \, dx\) [18]

Optimal. Leaf size=168 \[ \frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {PolyLog}\left (2,-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1-c-d x}\right )}{2 d e}-\frac {b^2 \text {PolyLog}\left (3,-1+\frac {2}{1-c-d x}\right )}{2 d e} \]

[Out]

-2*(a+b*arctanh(d*x+c))^2*arctanh(-1+2/(-d*x-c+1))/d/e-b*(a+b*arctanh(d*x+c))*polylog(2,1-2/(-d*x-c+1))/d/e+b*
(a+b*arctanh(d*x+c))*polylog(2,-1+2/(-d*x-c+1))/d/e+1/2*b^2*polylog(3,1-2/(-d*x-c+1))/d/e-1/2*b^2*polylog(3,-1
+2/(-d*x-c+1))/d/e

________________________________________________________________________________________

Rubi [A]
time = 0.22, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {6242, 12, 6033, 6199, 6095, 6205, 6745} \begin {gather*} -\frac {b \text {Li}_2\left (1-\frac {2}{-c-d x+1}\right ) \left (a+b \tanh ^{-1}(c+d x)\right )}{d e}+\frac {b \text {Li}_2\left (\frac {2}{-c-d x+1}-1\right ) \left (a+b \tanh ^{-1}(c+d x)\right )}{d e}+\frac {2 \tanh ^{-1}\left (1-\frac {2}{-c-d x+1}\right ) \left (a+b \tanh ^{-1}(c+d x)\right )^2}{d e}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{-c-d x+1}\right )}{2 d e}-\frac {b^2 \text {Li}_3\left (\frac {2}{-c-d x+1}-1\right )}{2 d e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c + d*x])^2/(c*e + d*e*x),x]

[Out]

(2*(a + b*ArcTanh[c + d*x])^2*ArcTanh[1 - 2/(1 - c - d*x)])/(d*e) - (b*(a + b*ArcTanh[c + d*x])*PolyLog[2, 1 -
 2/(1 - c - d*x)])/(d*e) + (b*(a + b*ArcTanh[c + d*x])*PolyLog[2, -1 + 2/(1 - c - d*x)])/(d*e) + (b^2*PolyLog[
3, 1 - 2/(1 - c - d*x)])/(2*d*e) - (b^2*PolyLog[3, -1 + 2/(1 - c - d*x)])/(2*d*e)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 6033

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)/(x_), x_Symbol] :> Simp[2*(a + b*ArcTanh[c*x])^p*ArcTanh[1 - 2/(1
 - c*x)], x] - Dist[2*b*c*p, Int[(a + b*ArcTanh[c*x])^(p - 1)*(ArcTanh[1 - 2/(1 - c*x)]/(1 - c^2*x^2)), x], x]
 /; FreeQ[{a, b, c}, x] && IGtQ[p, 1]

Rule 6095

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rule 6199

Int[(ArcTanh[u_]*((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[1/2, Int[
Log[1 + u]*((a + b*ArcTanh[c*x])^p/(d + e*x^2)), x], x] - Dist[1/2, Int[Log[1 - u]*((a + b*ArcTanh[c*x])^p/(d
+ e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d + e, 0] && EqQ[u^2 - (1 - 2/(1 - c*x
))^2, 0]

Rule 6205

Int[(Log[u_]*((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-(a + b*ArcT
anh[c*x])^p)*(PolyLog[2, 1 - u]/(2*c*d)), x] + Dist[b*(p/2), Int[(a + b*ArcTanh[c*x])^(p - 1)*(PolyLog[2, 1 -
u]/(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d + e, 0] && EqQ[(1 - u)^2 - (1
- 2/(1 - c*x))^2, 0]

Rule 6242

Int[((a_.) + ArcTanh[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[
Int[(f*(x/d))^m*(a + b*ArcTanh[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f,
 0] && IGtQ[p, 0]

Rule 6745

Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /
;  !FalseQ[w]] /; FreeQ[n, x]

Rubi steps

\begin {align*} \int \frac {\left (a+b \tanh ^{-1}(c+d x)\right )^2}{c e+d e x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right )^2}{e x} \, dx,x,c+d x\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right )^2}{x} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {(4 b) \text {Subst}\left (\int \frac {\tanh ^{-1}\left (1-\frac {2}{1-x}\right ) \left (a+b \tanh ^{-1}(x)\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {(2 b) \text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right ) \log \left (2-\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}+\frac {(2 b) \text {Subst}\left (\int \frac {\left (a+b \tanh ^{-1}(x)\right ) \log \left (\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {Subst}\left (\int \frac {\text {Li}_2\left (1-\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}-\frac {b^2 \text {Subst}\left (\int \frac {\text {Li}_2\left (-1+\frac {2}{1-x}\right )}{1-x^2} \, dx,x,c+d x\right )}{d e}\\ &=\frac {2 \left (a+b \tanh ^{-1}(c+d x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1-c-d x}\right )}{d e}-\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (1-\frac {2}{1-c-d x}\right )}{d e}+\frac {b \left (a+b \tanh ^{-1}(c+d x)\right ) \text {Li}_2\left (-1+\frac {2}{1-c-d x}\right )}{d e}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1-c-d x}\right )}{2 d e}-\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1-c-d x}\right )}{2 d e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.26, size = 424, normalized size = 2.52 \begin {gather*} \frac {a^2 \log (c+d x)+2 a b \tanh ^{-1}(c+d x) \left (-\log \left (\frac {1}{\sqrt {1-(c+d x)^2}}\right )+\log \left (\frac {i (c+d x)}{\sqrt {1-(c+d x)^2}}\right )\right )-\frac {1}{4} a b \left (\pi ^2-4 i \pi \tanh ^{-1}(c+d x)-8 \tanh ^{-1}(c+d x)^2-8 \tanh ^{-1}(c+d x) \log \left (1-e^{-2 \tanh ^{-1}(c+d x)}\right )+4 i \pi \log \left (1+e^{2 \tanh ^{-1}(c+d x)}\right )+8 \tanh ^{-1}(c+d x) \log \left (1+e^{2 \tanh ^{-1}(c+d x)}\right )-4 i \pi \log \left (\frac {2}{\sqrt {1-(c+d x)^2}}\right )-8 \tanh ^{-1}(c+d x) \log \left (\frac {2}{\sqrt {1-(c+d x)^2}}\right )+8 \tanh ^{-1}(c+d x) \log \left (\frac {2 i (c+d x)}{\sqrt {1-(c+d x)^2}}\right )+4 \text {PolyLog}\left (2,e^{-2 \tanh ^{-1}(c+d x)}\right )+4 \text {PolyLog}\left (2,-e^{2 \tanh ^{-1}(c+d x)}\right )\right )+b^2 \left (\frac {i \pi ^3}{24}-\frac {2}{3} \tanh ^{-1}(c+d x)^3-\tanh ^{-1}(c+d x)^2 \log \left (1+e^{-2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x)^2 \log \left (1-e^{2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c+d x)}\right )+\tanh ^{-1}(c+d x) \text {PolyLog}\left (2,e^{2 \tanh ^{-1}(c+d x)}\right )+\frac {1}{2} \text {PolyLog}\left (3,-e^{-2 \tanh ^{-1}(c+d x)}\right )-\frac {1}{2} \text {PolyLog}\left (3,e^{2 \tanh ^{-1}(c+d x)}\right )\right )}{d e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c + d*x])^2/(c*e + d*e*x),x]

[Out]

(a^2*Log[c + d*x] + 2*a*b*ArcTanh[c + d*x]*(-Log[1/Sqrt[1 - (c + d*x)^2]] + Log[(I*(c + d*x))/Sqrt[1 - (c + d*
x)^2]]) - (a*b*(Pi^2 - (4*I)*Pi*ArcTanh[c + d*x] - 8*ArcTanh[c + d*x]^2 - 8*ArcTanh[c + d*x]*Log[1 - E^(-2*Arc
Tanh[c + d*x])] + (4*I)*Pi*Log[1 + E^(2*ArcTanh[c + d*x])] + 8*ArcTanh[c + d*x]*Log[1 + E^(2*ArcTanh[c + d*x])
] - (4*I)*Pi*Log[2/Sqrt[1 - (c + d*x)^2]] - 8*ArcTanh[c + d*x]*Log[2/Sqrt[1 - (c + d*x)^2]] + 8*ArcTanh[c + d*
x]*Log[((2*I)*(c + d*x))/Sqrt[1 - (c + d*x)^2]] + 4*PolyLog[2, E^(-2*ArcTanh[c + d*x])] + 4*PolyLog[2, -E^(2*A
rcTanh[c + d*x])]))/4 + b^2*((I/24)*Pi^3 - (2*ArcTanh[c + d*x]^3)/3 - ArcTanh[c + d*x]^2*Log[1 + E^(-2*ArcTanh
[c + d*x])] + ArcTanh[c + d*x]^2*Log[1 - E^(2*ArcTanh[c + d*x])] + ArcTanh[c + d*x]*PolyLog[2, -E^(-2*ArcTanh[
c + d*x])] + ArcTanh[c + d*x]*PolyLog[2, E^(2*ArcTanh[c + d*x])] + PolyLog[3, -E^(-2*ArcTanh[c + d*x])]/2 - Po
lyLog[3, E^(2*ArcTanh[c + d*x])]/2))/(d*e)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 11.78, size = 840, normalized size = 5.00 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(d*x+c))^2/(d*e*x+c*e),x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2/e*ln(d*x+c)+b^2/e*ln(d*x+c)*arctanh(d*x+c)^2-b^2/e*arctanh(d*x+c)*polylog(2,-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*ln(d*x+c)*ln(d*x+c+1)-a*b/e*di
log(d*x+c))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(d*x+c))^2/(d*e*x+c*e),x, algorithm="maxima")

[Out]

a^2*e^(-1)*log(d*x*e + c*e)/d + integrate(1/4*b^2*(log(d*x + c + 1) - log(-d*x - c + 1))^2/(d*x*e + c*e) + a*b
*(log(d*x + c + 1) - log(-d*x - c + 1))/(d*x*e + c*e), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(d*x+c))^2/(d*e*x+c*e),x, algorithm="fricas")

[Out]

integral((b^2*arctanh(d*x + c)^2 + 2*a*b*arctanh(d*x + c) + a^2)*e^(-1)/(d*x + c), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {a^{2}}{c + d x}\, dx + \int \frac {b^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{c + d x}\, dx + \int \frac {2 a b \operatorname {atanh}{\left (c + d x \right )}}{c + d x}\, dx}{e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(d*x+c))**2/(d*e*x+c*e),x)

[Out]

(Integral(a**2/(c + d*x), x) + Integral(b**2*atanh(c + d*x)**2/(c + d*x), x) + Integral(2*a*b*atanh(c + d*x)/(
c + d*x), x))/e

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(d*x+c))^2/(d*e*x+c*e),x, algorithm="giac")

[Out]

integrate((b*arctanh(d*x + c) + a)^2/(d*e*x + c*e), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atanh}\left (c+d\,x\right )\right )}^2}{c\,e+d\,e\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c + d*x))^2/(c*e + d*e*x),x)

[Out]

int((a + b*atanh(c + d*x))^2/(c*e + d*e*x), x)

________________________________________________________________________________________